/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mensajes;

import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;

/**
 *
 * @author Usuario
 */
public class ComponerMensajeForm extends ActionForm {
        private String asunto;
	private String destinatario;
        private String texto;
        private String remitenteId;
        protected FormFile file;
        
        public FormFile getFile() {
		return file;
	}
        private String universidad;
        private String nucleo;

	public void setFile(FormFile file) {
		this.file = file;
	}
                
        public String getUniversidad() {
		return universidad;
	}
        public void setUniversidad(String universidad) {
		this.universidad = universidad;
	}
        public String getNucleo() {
		return nucleo;
	}
        public void setNucleo(String nucleo) {
		this.nucleo = nucleo;
	}
        
        
	public String getDestinatario() {
		return destinatario;
	}

	public void setDestinatario(String destinatario) {
		this.destinatario = destinatario;
	}
        
        public String getTexto() {
		return texto;
	}

	public void setTexto(String texto) {
		this.texto = texto;
	}
	
	
	private String error;

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}

	public void setError() {
		this.error =
			"<span style='color:red'>Please provide valid entries for both fields</span>";
	}
        
        public String getRemitenteId() {
		return remitenteId;
	}

	/**
	 * @param string
	 */
	public void setRemitenteId(String remitenteId) {
		this.remitenteId = remitenteId;
	}
        
        

	public String getAsunto() {
		return asunto;
	}

	/**
	 * @param string
	 */
	public void setAsunto(String string) {
		asunto = string;
	}


	public ComponerMensajeForm() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * This is the action called from the Struts framework.
	 * @param mapping The ActionMapping used to select this instance.
	 * @param request The HTTP Request we are processing.
	 * @return
	 */
/*	@Override
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		if (getAsunto() == null || getAsunto().length() < 1) {
			errors.add("asunto", new ActionMessage("error.asunto.required"));
			// TODO: add 'error.asunto.required' key to your resources
		}
                if (getTexto() == null || getTexto().length() < 1) {
			errors.add("texto", new ActionMessage("error.texto.required"));
			// TODO: add 'error.asunto.required' key to your resources
		}
                if (getDestinatario() == null || getDestinatario().length() < 1) {
			errors.add("asunto", new ActionMessage("error.destinatario.required"));
			// TODO: add 'error.asunto.required' key to your resources
		}
		return errors;
                
	}    */
}


